package org.dizem.intellipainter.component;

import javax.swing.*;
import java.awt.*;

/**
 * User: dizem@126.com
 * Time: 12-2-18 下午6:27
 */
public class SplitLabel extends JLabel {
	private static final Dimension SIZE = new Dimension(10, 100);

	public SplitLabel() {
		setDoubleBuffered(true);
		setPreferredSize(SIZE);
		setMaximumSize(SIZE);
		setMinimumSize(SIZE);
		setForeground(Color.GRAY);
	}

	public SplitLabel(int height) {
		setMaximumSize(new Dimension(10, height));
		setMinimumSize(new Dimension(10, height));
		setForeground(Color.GRAY);
	}

	@Override
	public void paint(Graphics g) {
		super.paint(g);
		g.drawLine(5, 2, 5, getHeight() - 5);
	}
}
